#include "Projectile.h"

using namespace gaim;

Projectile::Projectile(const std::map<std::string, Image>& images, const std::string& startingImage,
                       const Point2& pos, const Vector2& vel, const int& z) :
                       DynamicSprite(images, startingImage, pos, vel, z){}

Projectile* Projectile::getInstance(const std::map<std::string, Image>& images, const std::string& startingImage,
                                   const Point2& pos, const Vector2& vel, const int& z){
    return new Projectile(images, startingImage, pos, vel,  z);
}

void Projectile::update(const std::set<Sprite*>& sprites, const double dt){
    //gravity + wind
    DynamicSprite::update(sprites, dt);
    std::set<Sprite*> collided = checkCollisions(sprites);
    for (std::set<Sprite*>::iterator i = collided.begin(); i != collided.end(); ++i){
        impact(*i);
    }
}

void Projectile::impact(Sprite* impacted){
    ;
}
